#!/usr/bin/python3
#生成二维码，先要安装pip install qrcode
import qrcode
img = qrcode.make('https://github.com')
'''
qr = qrcode.QRCode(
    version=1,
    error_correction=qrcode.constants.ERROR_CORRECT_L,
    box_size=10,
    border=4,
)
qr.add_data('https://github.com')
qr.make(fit=True)

img = qr.make_image(fill_color="black", back_color="white")
'''

img_file = r'D:/test.jpg'
# 保存二维码
img.save(img_file)
# 展示二维码
img.show()